﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Marin.UI
{
    public partial class frmMenuInicio : Form
    {
        public frmMenuInicio()
        {
            InitializeComponent();
        }

        private void buscarCategoriaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmListCategorias = new frmListCategorias();
            frmListCategorias.MdiParent = this;
            frmListCategorias.Show();
        }

        private void buscarEgresosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmListEgresos = new frmListEgresos();
            frmListEgresos.MdiParent = this;
            frmListEgresos.Show();
        }

        private void buscarCuentaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmListCuenta = new frmListCuenta();
            frmListCuenta.MdiParent = this;
            frmListCuenta.Show();
        }

        private void nuevaCuentaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmCuenta = new frmMttCuenta();
            frmCuenta.AddCuenta();
            frmCuenta.Show();
        }

        private void registrarEgresoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmMttoEgreso = new frmMttoEgreso();
            frmMttoEgreso.AddNuevoEgreso();
            frmMttoEgreso.MdiParent = this;
            frmMttoEgreso.Show();
        }

        private void buscarIngresoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmIngresos = new frmListadoIngresos();
            
            frmIngresos.MdiParent = this;
            frmIngresos.Show();
        }

        private void nuevoIngresoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmIngresos = new frmListIngresos();
            frmIngresos.AddIngreso();
            frmIngresos.MdiParent = this;
            frmIngresos.Show();
        }

        private void frmMenuInicio_Load(object sender, EventArgs e)
        {
            this.Text = "                     .: Trasnportes Marín :.";
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            //string titulo;

            //titulo = this.Text;

            //this.Text = titulo.Substring(1, titulo.ToString().Length - 1)
            //    + titulo.Substring(0, 1);
        }

        private void nuevaCategoriaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmCategoria = new frmCategorias();
            frmCategoria.AddCategoria();
            frmCategoria.MdiParent = this;
            frmCategoria.Show();
        }
    }
}
